all: _timedemo.so

timedemo_wrap.c: timedemo.i
	swig -python timedemo.i

timedemo_wrap.o: timedemo_wrap.c
	gcc -c timedemo_wrap.c -o timedemo_wrap.o -I/usr/include/python2.6

timedemo.o: timedemo.c
	gcc -c timedemo.c -lsqlite3 -p -o timedemo.o -I/usr/include/python2.6

_timedemo.so: timedemo.o timedemo_wrap.o
	ld -share timedemo.o timedemo_wrap.o -o _timedemo.so

clean:
	rm gmon.out timedemo *.o